﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class cms_dantoc : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnNewRow_Click(object sender, EventArgs e)
    {
        gvList.ShowFooter = true;
    }
    protected void lbtInsert_Click(object sender, EventArgs e)
    {
        string tentrinhdoCM = string.Empty;
        try
        {
            TextBox txt = (TextBox)gvList.FooterRow.FindControl("txtNameAdd");
            tentrinhdoCM = txt.Text;
        }
        catch {}
        if (!string.IsNullOrEmpty(tentrinhdoCM))
        {
            sdsSource.InsertParameters["trinhdoCM"].DefaultValue = tentrinhdoCM;
            sdsSource.Insert();
        }
    }
    protected void lbtCancel_Click(object sender, EventArgs e)
    {
        gvList.ShowFooter = false;
    }
}
